

const fs = require('fs')
const child_pro = require('child_process')


console.log("---------- master --------------------------", __dirname)


for (let index = 0; index < 3; index++) {
    var wkPro = child_pro.exec('node ' + __dirname + '/support.js ' + index, function (err, stdout, stderr) {
        if (err) {
            console.log(err.stack);
            console.log('code:', err.code);
            console.log('single:', err.signal);
        }
        console.log('stdout:', stdout)
        console.log('stderr:', stderr)
    })

    wkPro.on('exit', function (err) {
        console.log('子进程已退出:', err)
    })
}


